﻿<%@ Page Title="" Language="C#" MasterPageFile="~/template_faa/master/faa_main.Master"
    AutoEventWireup="true" %>
<asp:Content ID="Content4" ContentPlaceHolderID="head_self" runat="server">
    <link rel="stylesheet" type="text/css" href="../ascx/easyui/demo/demo.css"/>
    <%
        if (Request["cmd"] =="post" )
        {
            string sql = "insert into [zhiFaDW] (zfdwName, zfdwAbbr, zfdwAddr, zfdwLinkman, zfdwTel) values(@zfdwName, @zfdwAbbr, @zfdwAddr, @zfdwLinkman, @zfdwTel)";
            System.Data.SqlClient.SqlParameter paraName = jsm.SqlHelper.SqlServerHelper.CreateInputParameter("@zfdwName", System.Data.SqlDbType.NVarChar, 100, Request["name"]);
            System.Data.SqlClient.SqlParameter paraAbbr = jsm.SqlHelper.SqlServerHelper.CreateInputParameter("@zfdwAbbr", System.Data.SqlDbType.NVarChar, 100, Request["simple_name"]);
            System.Data.SqlClient.SqlParameter paraAddr = jsm.SqlHelper.SqlServerHelper.CreateInputParameter("@zfdwAddr", System.Data.SqlDbType.NVarChar, 100, Request["address"]);
            System.Data.SqlClient.SqlParameter paraLinkman = jsm.SqlHelper.SqlServerHelper.CreateInputParameter("@zfdwLinkman", System.Data.SqlDbType.NVarChar, 100, Request["linkman"]);
            System.Data.SqlClient.SqlParameter paraTel = jsm.SqlHelper.SqlServerHelper.CreateInputParameter("@zfdwTel", System.Data.SqlDbType.NVarChar, 100, Request["telephone"]);
            int rc = jsm.SqlHelper.SqlServerHelper.ExecuteNonQuery(sql, paraName, paraAbbr, paraAddr, paraLinkman, paraTel);
        }
    %>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="body_left" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body_right_top" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="body_right_bottom" runat="server">
    <div>
        <div class="easyui-panel" title="添加新增执法单位" style="width: 400px">
            <div style="padding: 10px 0 10px 60px">
                <form id="ff" method="post">
                <table>
                    <tr>
                        <td>
                            单位名称：
                        </td>
                        <td>
                            <input class="easyui-validatebox" type="text" name="name" data-options="required:true"></input>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            单位简称：
                        </td>
                        <td>
                            <input class="easyui-validatebox" type="text" name="simple_name" data-options="required:true"></input>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            单位地址：
                        </td>
                        <td>
                            <input class="easyui-validatebox" type="text" name="address" data-options="required:true"></input>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            联系人：
                        </td>
                        <td>
                            <input class="easyui-validatebox" type="text" name="linkman" data-options="required:true"></input>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            联系电话：
                        </td>
                        <td>
                            <input class="easyui-validatebox" type="text" name="telephone" data-options="required:true"></input>
                        </td>
                    </tr>
                    
                </table>
                <input type="hidden" name="cmd" value="post" />
                </form>
            </div>
            <div style="text-align: center; padding: 5px">
                <a href="admin_DanWei_edit.aspx" class="easyui-linkbutton" onclick="submitForm()">提交</a>
                <a href="#" class="easyui-linkbutton" onclick="clearForm()">重置</a>
            </div>
        </div>

        <script>
            function submitForm() {
                $('#ff').form('submit');
            }
            function clearForm() {
                $('#ff').form('clear');
            }  
        </script>

    </div>
</asp:Content>
